package test.config;

import com.ulisesbocchio.jasyptspringboot.EncryptablePropertyResolver;
import com.ulisesbocchio.jasyptspringboot.detector.DefaultPropertyDetector;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : example
 * @ Author: XuLeHuang
 * @ Date: 2022/8/15 14:30
 * @ Description:
 */
@Configuration
public class JasyptConfig {
   /* @Bean(name = "encryptablePropertyDetector")
    public EncryptablePropertyDetector encryptablePropertyDetector() {
        return new MyEncryptablePropertyDetector();
    }*/
    @Bean(name="encryptablePropertyResolver")
    EncryptablePropertyResolver encryptablePropertyResolver(){
        return new MyEncryptPropertyResolver();
    }

    @Bean(name = "defaultPropertyDetector")
    public DefaultPropertyDetector encryptablePropertyDetector() {
        return new DefaultPropertyDetector("ENN(" , ")");
    }

}
